<?xml version="1.0" encoding="Windows-1250"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/REC-html40">
  <xsl:output method="html" encoding="windows-1250"/>

  <xsl:template match="DPOutput">
  <p>
    <form action="?" method="post" name="create" onsubmit="return check(document.create)">
      <font size="+1">
        <b>User Settings</b>
      </font>
      <br>
        Login is available. Now enter this further information needed for the registration process.
      </br>

      <input type="hidden" name="dp" value="insert"/>
      <input type="hidden" name="bsxpersonulevel" value="beg"/>
      <p>
        <table>
          <tr>
            <td>
              <b>
                <font size="-1">Login: </font>
              </b>
              <font size="-2">Code used for identifying users upon login into the system.</font>
            </td>
          </tr>
          <tr>
            <td>
              <font color="#ff0000"><xsl:value-of select="DPParam[@name='login']"/></font>
              <input type="hidden" name="bsxpersonlogin" value="{DPParam[@name='login']}"/>
            </td>            
          </tr>
          <tr>
            <td>
              <b>
                <font size="-1">Name: * </font>
              </b>
              <font size="-2">Name and last name of the user being registered.</font>
            </td>
          </tr>
          <tr>
            <td>
               <input type="text" name="bsxpersondescr" size="40"/>
            </td>
          </tr>
          <tr>
            <td>
              <b>
                <font size="-1">E-Mail: * </font>
              </b>
              <font size="-2">Electronic mail address.</font>
            </td>
          </tr>
          <tr>
            <td>
               <input type="text" name="bsxpersonemail" size="40"/>
            </td>
          </tr>
          <tr>
            <td>
              <b>
                <font size="-1">Password: * </font>
              </b>
              <font size="-2">Password used for login.</font>
            </td>
          </tr>
          <tr>
            <td>
               <input type="password" name="bsxpersonpasswd" size="40"/>
            </td>
          </tr>
          <tr>
            <td>
              <b>
                <font size="-1">Repeat Password: * </font>
              </b>
              <font size="-2">Password validation.</font>
            </td>
          </tr>
          <tr>
            <td>
               <input type="password" name="pwd_pom" size="40"/>
            </td>
          </tr>
          <tr>
            <td>
              <input type="submit" value="Register" size="30"/>
            </td>
          </tr>
        </table>
      </p>
    </form>

      <script language="JavaScript" type="text/javascript"><xsl:comment>document.create.descr.focus();
           function check(f)
           {
             if(!valText(f.bsxpersonlogin,"Login")) return false;
             if(!valText(f.bsxpersondescr,"Name")) return false;
             if(!valText(f.bsxpersonemail,"E-Mail")) return false;
             if(!valText(f.bsxpersonpasswd,"Password")) return false;
             if(!valText(f.pwd_pom,"Repeat Password")) return false;
             if(f.bsxpersonpasswd.value != f.pwd_pom.value)
             {
               alert("Badly repeated password");
               f.pwd_pom.value="";
               f.bsxpersonpasswd.value="";
               f.bsxpersonpasswd.focus();
               return false;
             }
             return true;
        }

        function valText(elem,nazev) {
        	var s=elem.value;
        	if (s.length==0 || countT(s, ' ')==s.length) {
        		alert("Must Enter: "+nazev);
        		elem.focus();
        		elem.select();
        		return false;			
        	} else 
        		return true;		 
        }
          
        function countT(s, charSet) 
        {
          var counter=0;
          for(i=0; i&lt;s.length; i++) 
          {
            if(charSet.indexOf(s.charAt(i)) > -1)
            counter++;
          }
          return counter;

        }//</xsl:comment></script>

  </p>
  </xsl:template>

  <xsl:template name="title">User Registration</xsl:template>


</xsl:stylesheet>